﻿#region Copyright

//  ======================================================
//      Copyright (c) 2011 Toulr All rights reserved.
//     
//      The use and distribution terms for this software are contained in the file
//      named license.txt, which can be found in the root of this distribution.
//      By using this software in any fashion, you are agreeing to be bound by the
//      terms of this license.
//     
//     You must not remove this notice, or any other, from this software.
//  ======================================================

#endregion

#region Using Namespaces

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

#endregion

namespace Toulr.Domains.System
{
    /// <summary>
    ///   省份模型对象
    /// </summary>
    /// Author: James Cheung
    /// MachineName: JAMESCHEUNG-PC
    /// DateTime: 2011/5/10 11:06
    public class Province
    {
        #region Property

        /// <summary>
        ///   获取或设置当前省的标识ID
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public int Id { get; set; }

        /// <summary>
        ///   当前省份名称
        /// </summary>
        [Required, MaxLength(30)]
        public String ProvinceName { get; set; }

        /// <summary>
        ///   当前配置是否可用
        /// </summary>
        [Required]
        public Boolean Enabled { get; set; }

        #endregion

        #region Associaction Objects
        /// <summary>
        ///   当前省份包括的城市列表
        /// </summary>
        [NotMapped]
        public virtual ICollection<City> Cities
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}